<template>
  <el-dialog :title="title" :visible.sync="dialogVisible" :close-on-click-modal="false" width="850px">
    <div class="form-box" >
      <el-table border :data="list" style="width: 100%;height: calc(100vh - 20vh - 160px);">
        <!-- <el-table-column prop="id" label="编号" width="55">
        </el-table-column> -->
        <el-table-column prop="id" label="回收ID" width="90">
        </el-table-column>
        <el-table-column prop="account" label="游戏账号" >
        </el-table-column>
        <el-table-column prop="bprice" label="报价" >
        </el-table-column>
        <el-table-column prop="supplyUserName" label="报价人">
        </el-table-column>
        <el-table-column prop="btime" label="报价时间">
        </el-table-column>
      </el-table>
      <div class="pages-box">
      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
        :current-page="queryParams.pageNum" :page-sizes="[10, 20, 30, 40, 50, 60]" :page-size="queryParams.pageSize"
        layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
    </div>
    </div>
  </el-dialog>
</template>

<script>
import onSelfApi from '@/api/retrieveManage/onSelf.js'
export default {
  name: "",
  data() {
    return {
      dialogVisible: false,
      loading: false,
      title: "报价列表",
      list: [],
      total:0,

      // 表单参数
      form: {},
      rules: {},
      queryParams:{
        pageNum: 1,
        pageSize: 20,
        backId:'',
        selectType:'allQue'
      }
    };
  },
  created() {
  },
  methods: {
    // 打开弹窗
    open(data) {
      this.dialogVisible = true;
      this.queryParams={
        pageNum: 1,
        pageSize: 20,
        backId:'',
        selectType:'allQue'
      }
      this.queryParams.backId = data.id
      this.getList();
    },
    getList() {
      onSelfApi.kefuViewPrices(this.queryParams).then(res => {
        this.list = res.rows
        this.total = res.total
      })
    },
    close() {
      this.dialogVisible = false;
    },
    // 每页条数改变
    handleSizeChange(val) {
      this.queryParams.pageSize = val;
      this.getList();
    },
    // 页码改变
    handleCurrentChange(val) {
      this.queryParams.pageNum = val;
      this.getList();
    }
  }
};
</script>
<style scoped lang="css">
.center {
  text-align: center;
}

.form-box {
  width: 100%;
  height: calc(100vh - 20vh - 100px);
  padding-top: 20px;
}

.img-box {
  width: 700px;
}
</style>
